package com.aaa.security;

import org.springframework.security.crypto.password.PasswordEncoder;

public class MyPasswordEncoder implements PasswordEncoder {
    //编码
    @Override
    public String encode(CharSequence charSequence) {
        System.out.println("charSequence"+charSequence.toString());
        return "123";
    }
//匹配
    @Override
    public boolean matches(CharSequence charSequence, String s) {
        System.out.println("c"+charSequence.toString());
        System.out.println("s"+s.toString());
        return charSequence.equals(s);
    }
}
